package com.example.ftptest;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class FtpFileUtil {

    @Value("ftp.ftpPathWindows")
    private String ftpPathWindows;
    @Value("ftp.ftpPathElse")
    private String ftpPathElse;

    public String getPathByOsName() {
        if (System.getProperty("os.name").toLowerCase().contains("windows")) {
            return ftpPathWindows;
        } else {
            return ftpPathElse;
        }
    }
}
